<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	

<h:head>
<link href="../resources/css/admin.css" rel="stylesheet" type="text/css" />
</h:head>


<h:body>
	<div class="contenitore">
 		<div class="riga">
  			<div class="colonna-1">
				<img id="immagine" src="../resources/images/logo.jpg" alt="" />
				
  			</div>
  			<div class="colonna-1-2">
  				<h1>Administration Panel</h1>	
 				<h:outputText id="welcometext" value="Pannello dedicato alla gestione e creazione dei contenuti del sito TravelDream"></h:outputText>
  			</div>
 		</div>
 		
 		<div id="riga2">
  			<div class="colonna-2-1">
  				<h:form>
						<p:commandButton action="#{logoutBean.logout}" value="Logout" />
				</h:form>
  			</div>
  			<div class="colonna-2-2">
  				<h:form>
  				<p:panel header="Modifica il pacchetto">
		     		<h:panelGrid columns="2" id="regGrid">
		     			
		     			
    						
							<h:outputText id="name"  value="Nome Pacchetto: #{infoPacchettoAdminBean.packagebyid.nome}" />
							<p:inputText id="nome" value="#{modificaPacchettoBean.current.nome}"/>
							
							<h:outputText value="Descrizione: #{infoPacchettoAdminBean.packagebyid.descrizione}" />
							<p:inputText id="descrizione" value="#{modificaPacchettoBean.current.descrizione}"/>
							
							<h:outputText value="Citta: #{infoPacchettoAdminBean.packagebyid.citta}" />
							<p:inputText id="citta" value="#{modificaPacchettoBean.current.citta}"/>
							
							<h:outputText value="Durata: #{infoPacchettoAdminBean.packagebyid.durataviaggio}" />
							<p:inputText id="durata" value="#{modificaPacchettoBean.current.durataViaggio}"/>
							
		     			    <p:selectManyMenu value="#{modificaPacchettoBean.current.selectedHotels}" >	
		     					<f:selectItems value="#{infoPacchettoAdminBean.packagebyid.hotel}" var="h" itemLabel="#{h.name}" itemValue="#{h.id}"/>  
        					</p:selectManyMenu>
        					<p:selectManyMenu value="#{modificaPacchettoBean.current.selectedAndata}" >  
				            	<f:selectItems value="#{infoPacchettoAdminBean.packagebyid.voliandata}" var="va" itemLabel="#{va.nome}" itemValue="#{va.id}"/>  
       						</p:selectManyMenu>
     						<p:selectManyMenu value="#{modificaPacchettoBean.current.selectedRitorno}" >  
         						<f:selectItems value="#{infoPacchettoAdminBean.packagebyid.voliritorno}" var="vr" itemLabel="#{vr.nome}" itemValue="#{vr.id}"/>  
      					    </p:selectManyMenu>
      					    <p:selectManyMenu value="#{modificaPacchettoBean.current.selectedExcursions}" >  
         						<f:selectItems value="#{infoPacchettoAdminBean.packagebyid.escursioni}" var="vr" itemLabel="#{vr.name}" itemValue="#{vr.id}"/>  
      					    </p:selectManyMenu>
      					    <p:commandButton value="Modifica" action="#{modificaPacchettoBean.modify(infoPacchettoAdminBean.packagebyid.id)}"/>
		     			
		     		</h:panelGrid>
		     	</p:panel>
  				</h:form>
  			</div>
  			<div class="colonna-2-3">
  				<h:panelGrid columns="1" cellpadding="10">
  					<h:form>
      				<p:commandButton id="button" action="showhotel" value="Mostra tutti gli Hotel" ajax="false"/>
      				<p:commandButton action="showtransport" value="Mostra tutti i Trasporti" ajax="false"/>
      				<p:commandButton action="showexcursion" value="Mostra tutte le Escursioni" ajax="false"/>
      				<p:commandButton action="showpacchetto" value="Mostra tutti i Pacchetti" ajax="false"/>
      				</h:form>
      			</h:panelGrid>
      			<h:panelGrid columns="1" cellpadding="10">
      				<h:form>
      				<p:commandButton action="creahotel" value="+Crea Hotel" ajax="false"/>
      				<p:commandButton action="creatrasporto" value="+Crea Trasporto" ajax="false"/>
      				<p:commandButton action="creaescursione" value="+Crea Escursione" ajax="false"/>
      				<p:commandButton action="creapacchetto" value="+Crea Pacchetto" ajax="false"/>
      				</h:form>
      			</h:panelGrid>
  			
  			</div>
 		</div>
 	</div>
</h:body>
</html>